]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st-entry: don't assume a cursor func has been set
authorCosimo Cecchi <cosimoc@gnome.org>
Tue, 6 Jun 2017 21:27:18 +0000 (14:27 -0700)
committerCosimo Cecchi <cosimoc@gnome.org>
Wed, 14 Jun 2017 20:59:04 +0000 (13:59 -0700)
That won't be the case when called from tests.

https://bugzilla.gnome.org/show_bug.cgi?id=783484

src/st/st-entry.c

index 152f3eb8e95bd9824544a7496db7fff23fb15b2e..d81463d5e4ee1be37c2a0c652b549eba0f909c90 100644 (file)
@@ -739,7 +739,8 @@ static void
 st_entry_set_cursor (StEntry  *entry,
                      gboolean  use_ibeam)
 {
-  cursor_func (entry, use_ibeam, cursor_func_data);
+  if (cursor_func)
+    cursor_func (entry, use_ibeam, cursor_func_data);
 
   ((StEntryPrivate *)ST_ENTRY_PRIV (entry))->has_ibeam = use_ibeam;
 }